package day7;

public class Teacher {
    private String name, sex;
    private int age, teachingYears;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getTeachingYears() {
        return teachingYears;
    }

    public void setTeachingYears(int teachingYears) {
        this.teachingYears = teachingYears;
    }

    Teacher() {
    }

    public Teacher(String name, String sex, int age, int teachingYears) {
        this.name = name;
        this.sex = sex;
        this.age = age;
        this.teachingYears = teachingYears;
    }

    public void selfIntroduce() {
        System.out.println("我叫" + name + "，年龄" + age + "，教龄" + teachingYears);
    }

    public void giveLession() {
        System.out.println("开始上课");
    }
}